package com.tedu.day04mybatis.mapper;

import com.tedu.day04mybatis.pojo.Student;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface StudentMapper {
    @Insert("insert into student(name,gender,age) values(#{name},#{gender},#{age})")
    public int insert(Student student);

    @Delete("delete from student where name=#{name}")
    public int deleteByName(String name);

    @Update("update student set name = #{name},age=#{age} where id=#{id}")
    int update(Student student);
}
